package basics.day17.Math;

import java.util.Random;

public class RandomDemo {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            double mr = Math.random(); // 取值范围 0.0 - 1.0
            System.out.println(mr);
        }
        System.out.println("======================");
        // Math.random和Random类出不多
        Random r = new Random();
        for (int i = 0; i < 10; i++) {
            System.out.println(r.nextInt(10));
        }
    }
}
